import Vue from 'vue'
import Router from 'vue-router'
import Index from '../views/Index.vue'
import Home from '../views/Home.vue'
import MarkPage from '../views/MarkPage.vue'
import CreateBatch from '../views/CreateBatch.vue'
import MarktaskDetail from '../views/MarktaskDetail.vue'
import MyintegralDetail from '../views/MyintegralDetail.vue'
import ResultPage from '../views/ResultPage.vue'
import CreateMedal from '../views/CreateMedal.vue'
import MedalPage from '../views/MedalPage.vue'
import Notfound from '../views/Notfound.vue'

Vue.use(Router)

export default new Router({
  base:'/assets/',
  mode: 'history',
  routes: [
    {
      path:'/',
      name:'index',
      component: Index
    },
    {
      path: '/home',
      component: Home,
      children:[
        {
          path: 'mark-page/*',
          name: 'mark-page',
          component: MarkPage,
          meta:{
            title:"标注"
          }
        },
        {
          path: 'create-batch/*',
          name: 'create-batch',
          component: CreateBatch,
          meta:{
            title:"创建批次"
          }
        },
        {
          path: 'marktask-detail/*',
          name: 'marktask-detail',
          component: MarktaskDetail,
          meta:{
            title:"标注任务详情"
          }
        },
        {
          path: 'myintegral-detail/*',
          name: 'myintegral-detail',
          component: MyintegralDetail,
          meta:{
            title:"我的积分详情"
          }
        },
        {
          path: 'result-page/*',
          name: 'result-page',
          component: ResultPage,
          meta:{
            title:"查看结果"
          }
        },
        {
          path: 'create-medal/*',
          name: 'create-medal',
          component: CreateMedal,
          meta:{
            title:"创建勋章"
          }
        },
        {
          path: 'medal-page/*',
          name: 'medal-page',
          component: MedalPage,
          meta:{
            title:"勋章标注"
          }
        }
      ]
    },
    {
      path: '*',
      component: Notfound,
      meta: {
        title: '找不到此页面'
      }
    }
  ]
})
